package ace.module.product.api.model.input;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.PositiveOrZero;
import jakarta.validation.constraints.Size;
import java.util.List;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

/**
 * 添加商品基础资料.
 * @author Caspar
 *
 */
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
public class PmsProductAttributeSaveInput {

  @Schema(title = "id", description = "修改必填")
  private Long id;

  @Builder.Default
  @NotNull
  @PositiveOrZero
  @Schema(title = "规格属性id", description = "0=null")
  private Long specAttributeId = 0L;

  @Builder.Default
  @NotEmpty
  @Size(max = 255)
  @Schema(title = "规格属性名", description = "")
  private String name = "";

  @Builder.Default
  @NotNull
  @Schema(title = "排序", description = "")
  private Integer sort = 0;

  @NotEmpty
  @Schema(title = "商品规格属性值")
  private List<PmsProductAttributeValueSaveInput> productAttributeValues;
}
